package com.lagou.demo.controller;

import com.lagou.demo.service.IDemoService;
import com.lagou.edu.mvcframework.annotations.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@LagouController
@LagouRequestMapping("/work")
@Security({"zhangsan"})
public class WorkController {

    @LagouAutowired
    private IDemoService demoService;

    @LagouRequestMapping("/query")
    @Security({"lisi"})
    public String query(HttpServletRequest request, HttpServletResponse response,String userName) {
        return demoService.get(userName);
    }



}
